package com.zhongan.consul.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class ConsulServer {

	@RequestMapping("/consul/home")
	String home() {
		System.out.println("helo world");
		System.out.println("hello world");
		return "Hello World!";
	}

	@RequestMapping("/consul/getName")
	String getName(Integer id, Integer id2) {
		return "kaicheng";
	}

	public static void main(String[] args) {
		SpringApplication.run(ConsulServer.class, args);
	}

}
